Greater Than (>) Operator in SAP ABAP
The Greater than (>) Operator in SAP ABAP Checks if the left operand is greater than the right operand.
DATA(lv_variable1) TYPE i VALUE 15.
DATA(lv_variable2) TYPE i VALUE 10.
IF lv_variable1 > lv_variable2.
WRITE: 'Variable1 is greater than Variable2.'.
ENDIF.
Output:
Variable1 is greater than Variable2
Relational operators in SAP ABAP
Relational operators in SAP ABAP are symbols or combinations of symbols that compare values and return a Boolean result (either true or false). These operators allow developers to establish relationships between variables, constants, or expressions, facilitating decision-making processes in the program’s logic. Relational operators in SAP ABAP are employed in conditional statements and expressions to control the flow of a program. They help determine whether a particular condition is true or false, guiding the program to execute specific code blocks accordingly. The relational operators in SAP ABAP include equality, inequality, greater than, less than, greater than or equal to, and less than or equal to.